1. Field of the Invention
The present invention relates to a disparity calculating method and stereo matching device thereof, and more particularly, to a disparity calculating method capable of smoothing the disparity information of the fringe area of the frame and stereo matching device thereof.
2. Description of the Prior Art
With continuously progressing image technologies, sizes and functionalities of display devices are increasingly diverse. In order to meet requirements of the different consumers, manufacturers of the display devices try to provide new products with better outputting performance and resolution. One of the most interesting products is a display device with three-dimensional display functionality. General three-dimensional display technologies include polarized, interlaced or anaglyph display methods. These display methods utilize special optical structures to project images with different views corresponding to depth information on human left and right eyes. Thus, the human left and right eyes may respectively capture the images with different views to be synthesized by the human brain, and the human may sense a three-dimensional image.
When two-dimensional images without the depth information are displayed by the display device having the three-dimensional display functionality, since the source images for displaying lack the depth information, the display device may not generate multi-views images corresponding to the depth information to be projected on the human left and right eyes. Under such a condition, the display device is required to analyze the two-dimensional images to obtain the depth information, so as to display the multi-views images. In the prior art, at least two images with different views are required to be obtained first by utilizing multiple image capture devices located in different locations, and the depth information may be analyzed from the at least two images with different views. A process for analyzing two images with different views to obtain the depth information is called stereo matching. In the stereo matching, matching objects (or characteristics, pixels, etc.) are searched for first between the two images with different views to obtain positional differences of the matching objects in the two images with different views. The positional differences are disparity information (or can be called a disparity map) of the two images, and the depth information of the matching objects may be calculated by the disparity information.
However, when the stereo matching is performed between the two images with different views for obtaining the depth information, since landscapes of the two images are not entirely the same and the two images with different views may be captured by the two image capture devices with different distances from each other, searching for the matching objects between the two images with different views to obtain the accurate disparity information may affect accuracy of the depth information. Due to occlusion effect, there are objects that cannot be matched in the images with two different views, resulting in errors when estimating the disparities. For example, the pixels of the fringe area in an image (e.g. the left fringe and the right fringe of the image) do not have corresponding pixels in another image with another view, generally, resulting in that the disparity information of the fringe area in the image has greater errors and deviations. Thus, how to reduce the errors and deviations of the disparity information of the fringe area in the image when performing stereo matching between images of two views becomes a topic to be discussed.